﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using FastTravel.BusinessLogic;
using FastTravel.DB;
using FastTravel.DB.Enums;

namespace FastTravel.IntranetWeb
{
	public partial class BasePage : System.Web.UI.Page
	{
		// Константы

		public const string sessionCurrentUser = "FAST_TRAVEL_CURRENT_USER";
		public const string urlHome = "./";
		public const string urlLogin = "Login.aspx";
		public const string urlCustomerAdd = "CustomerAdd.aspx";
		public const string resDashboard = "resources/Dashboard.xml";
		public const string resCountries = "resources/Countries.xml";
		
		// Отчеты

		public const string reportCustomerDetail = "CustomerReport.aspx";
		public const string reportLogo = "~/resources/custom/logo.jpg";
		public const string reportFont = "~/resources/fonts/arial.ttf";
		// Время

		public DateTime timeForMSSQLServer = new DateTime(1900, 01, 01, 00, 00, 00);
		public DateTime timeEmptyExtControls = new DateTime(0001, 01, 01, 00, 00, 00);
		
		// Общие переменные

		/// <summary>
		/// Получить текущего пользователя
		/// </summary>
		public CurrentUserDTO GetCurrentUser
		{
			get { return (CurrentUserDTO)Session[sessionCurrentUser]; }
		}

		/// <summary>
		/// Установить текущего пользователя
		/// </summary>
		/// <param name="currentUserDTO">Текущий пользователь</param>
		public void SetCurrentUser(CurrentUserDTO currentUserDTO)
		{
			Session[sessionCurrentUser] = currentUserDTO;
		}

		


	}
}